foodService.$inject = ['$http'];
var urlBase = '/cv4Backend';

function foodService($http) {
  return {
    findFoodByIcnum: function (icnum,callback) {
      $http.get(urlBase + '/findFoodListByIcnum/'+icnum).then(function(res){
        callback(res);
       }
      );
    },
    getFoodByIcnumFtype: function(icnum, ftype, callback) {
      $http.get(urlBase + '/getFoodByIcnumFtype/'+icnum+"/"+ftype).then(function(res){
        callback(res);
       }
      );
    }     
    
  
    
  }
}
module.exports = foodService;

// getFoodByIcnumFtype: function(icnum,ftype,callback){
//   $http.get(urlBase + '/findFoodListByIcnum/'+icnum).then(function(res){
//     callback(res);
//    }
// }